Hi all, |
Re: getting a linkset handle from a link module descriptor So no there is no function, that will do it for you. Why would you even need that? Test if a linkset exists for a linkmodule descritor? Regards, Mathias Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: getting a linkset handle from a link module descriptor Mathias Mamsch - Thu Mar 07 13:17:31 EST 2013 Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS I was wondering if I could delete the related linksets and links as well from this dialog box. Karl |
Re: getting a linkset handle from a link module descriptor kabr - Fri Mar 08 04:00:37 EST 2013
Deleting the LMD means the module is no longer has the contraints (or benefits) from the LMD; it has nothing to do with LinkSets or Links. If you are assigned a parking spot at work and we de-assign it, then you still have a car and the spot still exists. The "assignment" is just a piece of information, neither a car nor a spot.
NameLM = module(lmd)
NameSource = source(lmd)
NameTarget = target(lmd)
mCurr = current // Remember original current Module
Module mLM = edit(NameLM, false, true, true) // Open Link Module
if (null mLM) then No Such LM
mLM = current
for o in mLM do
{ LsSource = o."Source Something"
Lstarget = o."Target Something"
if (LsSource == NameSource and
LsTarget == NameTarget)
{ // Found LinkSet
LinkSet ls = linkset(o)
delete(ls)
flushDeletions()
save(mLM)
}
}
close(mLM)
current = mCurr // reinstate Current Module
|
Re: getting a linkset handle from a link module descriptor I am aware of the difference between LMD and linkset and all its aspects and implications. But I like your analogy, Louie. Maybe I will use it next time I try to explain the difference to one of my users. With your suggestions I am able to do what I want. Thanks again. Karl |